package com.example.dc.mapper;

import com.example.dc.domain.ChatBean;
import com.example.dc.domain.Chatgpt;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ChatMapper {

    @Insert("insert into d_chatgpt(question,anwser,user_id) values (#{question},#{anwser},#{userId})")
    public void insertContent(@Param("userId") Integer userId, @Param("question") String question, @Param("anwser") String answer);

    public List<String> getGreet(@Param("firstStander") String firstStander, @Param("secondStander") String secondStander);


    public List<Chatgpt> getHistory(@Param("userId") Integer userId);

    public List<Chatgpt> getHistoryByTime(@Param("userId") Integer userId, @Param("createTime") String createTime);
}
